package org.wjk.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;
import org.wjk.fuzhu.InsertGroup;
import org.wjk.fuzhu.UpdateGroup;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/*该类为封装类，该类要实现序列接口*/
@Data
@Accessors(chain = true)
@TableName("sys_menu")
public class SysMenuEntity extends CommonBase
{
    private static final long serialVersionUID = -1520872676580884470L;
    @NotNull(groups = UpdateGroup.class)
    @TableId(type = IdType.AUTO)
    private Integer id;
    @NotBlank(groups = {UpdateGroup.class, InsertGroup.class})
    private String name;
    private String alias;
    @NotNull(groups = {UpdateGroup.class, InsertGroup.class})
    private Integer type;
    @NotBlank(groups = {UpdateGroup.class, InsertGroup.class})
    private String features;
    private String path;
    private String comDir;
    private String comName;
    private String comTitle;
    /*当前访问时所需的权限标识*/
    private String permission;
    private String iconClass;
    private Integer parentId;
    private Integer applySys;
    @TableField(exist = false)
    private String parentName;
    private Integer sort;
    private Boolean enabled;
    private String recodeUser;
    private String modifiedUser;
}
